
<!DOCTYPE html>

<html>
  
<!-- Mirrored from docs.sympy.org/latest/modules/tensor/index_methods.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:28:07 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>Methods &#8212; SymPy 1.9 documentation</title>
    <link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/default.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
    <link rel="stylesheet" type="text/css" href="../../_static/plot_directive.css" />
    <link rel="stylesheet" type="text/css" href="../../../../live.sympy.org/static/live-core.css" />
    <link rel="stylesheet" type="text/css" href="../../../../live.sympy.org/static/live-autocomplete.css" />
    <link rel="stylesheet" type="text/css" href="../../../../live.sympy.org/static/live-sphinx.css" />
    
    <script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
    <script src="../../_static/jquery.js"></script>
    <script src="../../_static/underscore.js"></script>
    <script src="../../_static/doctools.js"></script>
    <script src="../../../../live.sympy.org/static/utilities.js"></script>
    <script src="../../../../live.sympy.org/static/external/classy.js"></script>
    <script src="../../../../live.sympy.org/static/live-core.js"></script>
    <script src="../../../../live.sympy.org/static/live-autocomplete.js"></script>
    <script src="../../../../live.sympy.org/static/live-sphinx.js"></script>
    
    <link rel="shortcut icon" href="../../_static/sympy-notailtext-favicon.ico"/>
    <link href="index_methods.html" rel="canonical" />
    
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="Tensor" href="tensor.html" />
    <link rel="prev" title="Indexed Objects" href="indexed.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="tensor.html" title="Tensor"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="indexed.html" title="Indexed Objects"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">Tensor</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Methods</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="module-sympy.tensor.index_methods">
<span id="methods"></span><h1>Methods<a class="headerlink" href="#module-sympy.tensor.index_methods" title="Permalink to this headline">¶</a></h1>
<p>Module with functions operating on IndexedBase, Indexed and Idx objects</p>
<ul class="simple">
<li><p>Check shape conformance</p></li>
<li><p>Determine indices in resulting expression</p></li>
</ul>
<p>etc.</p>
<p>Methods in this module could be implemented by calling methods on Expr
objects instead.  When things stabilize this could be a useful
refactoring.</p>
<dl class="py function">
<dt class="sig sig-object py" id="sympy.tensor.index_methods.get_contraction_structure">
<span class="sig-prename descclassname"><span class="pre">sympy.tensor.index_methods.</span></span><span class="sig-name descname"><span class="pre">get_contraction_structure</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/tensor/index_methods.py#L298-L469"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.tensor.index_methods.get_contraction_structure" title="Permalink to this definition">¶</a></dt>
<dd><p>Determine dummy indices of <code class="docutils literal notranslate"><span class="pre">expr</span></code> and describe its structure</p>
<p>By <em>dummy</em> we mean indices that are summation indices.</p>
<p>The structure of the expression is determined and described as follows:</p>
<ol class="arabic">
<li><p>A conforming summation of Indexed objects is described with a dict where
the keys are summation indices and the corresponding values are sets
containing all terms for which the summation applies.  All Add objects
in the SymPy expression tree are described like this.</p></li>
<li><p>For all nodes in the SymPy expression tree that are <em>not</em> of type Add, the
following applies:</p>
<p>If a node discovers contractions in one of its arguments, the node
itself will be stored as a key in the dict.  For that key, the
corresponding value is a list of dicts, each of which is the result of a
recursive call to get_contraction_structure().  The list contains only
dicts for the non-trivial deeper contractions, omitting dicts with None
as the one and only key.</p>
</li>
</ol>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The presence of expressions among the dictionary keys indicates
multiple levels of index contractions.  A nested dict displays nested
contractions and may itself contain dicts from a deeper level.  In
practical calculations the summation in the deepest nested level must be
calculated first so that the outer expression can access the resulting
indexed object.</p>
</div>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.tensor.index_methods</span> <span class="kn">import</span> <span class="n">get_contraction_structure</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">default_sort_key</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.tensor</span> <span class="kn">import</span> <span class="n">IndexedBase</span><span class="p">,</span> <span class="n">Idx</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">A</span> <span class="o">=</span> <span class="nb">map</span><span class="p">(</span><span class="n">IndexedBase</span><span class="p">,</span> <span class="p">[</span><span class="s1">&#39;x&#39;</span><span class="p">,</span> <span class="s1">&#39;y&#39;</span><span class="p">,</span> <span class="s1">&#39;A&#39;</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">i</span><span class="p">,</span> <span class="n">j</span><span class="p">,</span> <span class="n">k</span><span class="p">,</span> <span class="n">l</span> <span class="o">=</span> <span class="nb">map</span><span class="p">(</span><span class="n">Idx</span><span class="p">,</span> <span class="p">[</span><span class="s1">&#39;i&#39;</span><span class="p">,</span> <span class="s1">&#39;j&#39;</span><span class="p">,</span> <span class="s1">&#39;k&#39;</span><span class="p">,</span> <span class="s1">&#39;l&#39;</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">get_contraction_structure</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">*</span><span class="n">y</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">+</span> <span class="n">A</span><span class="p">[</span><span class="n">j</span><span class="p">,</span> <span class="n">j</span><span class="p">])</span>
<span class="go">{(i,): {x[i]*y[i]}, (j,): {A[j, j]}}</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">get_contraction_structure</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">*</span><span class="n">y</span><span class="p">[</span><span class="n">j</span><span class="p">])</span>
<span class="go">{None: {x[i]*y[j]}}</span>
</pre></div>
</div>
<p>A multiplication of contracted factors results in nested dicts representing
the internal contractions.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">get_contraction_structure</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="n">i</span><span class="p">]</span><span class="o">*</span><span class="n">y</span><span class="p">[</span><span class="n">j</span><span class="p">,</span> <span class="n">j</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">sorted</span><span class="p">(</span><span class="n">d</span><span class="o">.</span><span class="n">keys</span><span class="p">(),</span> <span class="n">key</span><span class="o">=</span><span class="n">default_sort_key</span><span class="p">)</span>
<span class="go">[None, x[i, i]*y[j, j]]</span>
</pre></div>
</div>
<p>In this case, the product has no contractions:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="p">[</span><span class="kc">None</span><span class="p">]</span>
<span class="go">{x[i, i]*y[j, j]}</span>
</pre></div>
</div>
<p>Factors are contracted “first”:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="nb">sorted</span><span class="p">(</span><span class="n">d</span><span class="p">[</span><span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="n">i</span><span class="p">]</span><span class="o">*</span><span class="n">y</span><span class="p">[</span><span class="n">j</span><span class="p">,</span> <span class="n">j</span><span class="p">]],</span> <span class="n">key</span><span class="o">=</span><span class="n">default_sort_key</span><span class="p">)</span>
<span class="go">[{(i,): {x[i, i]}}, {(j,): {y[j, j]}}]</span>
</pre></div>
</div>
<p>A parenthesized Add object is also returned as a nested dictionary.  The
term containing the parenthesis is a Mul with a contraction among the
arguments, so it will be found as a key in the result.  It stores the
dictionary resulting from a recursive call on the Add expression.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">get_contraction_structure</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">*</span><span class="p">(</span><span class="n">y</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">+</span> <span class="n">A</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="n">j</span><span class="p">]</span><span class="o">*</span><span class="n">x</span><span class="p">[</span><span class="n">j</span><span class="p">]))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">sorted</span><span class="p">(</span><span class="n">d</span><span class="o">.</span><span class="n">keys</span><span class="p">(),</span> <span class="n">key</span><span class="o">=</span><span class="n">default_sort_key</span><span class="p">)</span>
<span class="go">[(A[i, j]*x[j] + y[i])*x[i], (i,)]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="p">[(</span><span class="n">i</span><span class="p">,)]</span>
<span class="go">{(A[i, j]*x[j] + y[i])*x[i]}</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="p">[</span><span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">*</span><span class="p">(</span><span class="n">A</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="n">j</span><span class="p">]</span><span class="o">*</span><span class="n">x</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">+</span> <span class="n">y</span><span class="p">[</span><span class="n">i</span><span class="p">])]</span>
<span class="go">[{None: {y[i]}, (j,): {A[i, j]*x[j]}}]</span>
</pre></div>
</div>
<p>Powers with contractions in either base or exponent will also be found as
keys in the dictionary, mapping to a list of results from recursive calls:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">get_contraction_structure</span><span class="p">(</span><span class="n">A</span><span class="p">[</span><span class="n">j</span><span class="p">,</span> <span class="n">j</span><span class="p">]</span><span class="o">**</span><span class="n">A</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="n">i</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="p">[</span><span class="kc">None</span><span class="p">]</span>
<span class="go">{A[j, j]**A[i, i]}</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">nested_contractions</span> <span class="o">=</span> <span class="n">d</span><span class="p">[</span><span class="n">A</span><span class="p">[</span><span class="n">j</span><span class="p">,</span> <span class="n">j</span><span class="p">]</span><span class="o">**</span><span class="n">A</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="n">i</span><span class="p">]]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">nested_contractions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="go">{(j,): {A[j, j]}}</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">nested_contractions</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
<span class="go">{(i,): {A[i, i]}}</span>
</pre></div>
</div>
<p>The description of the contraction structure may appear complicated when
represented with a string in the above examples, but it is easy to iterate
over:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Expr</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">d</span><span class="p">:</span>
<span class="gp">... </span>    <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">Expr</span><span class="p">):</span>
<span class="gp">... </span>        <span class="k">continue</span>
<span class="gp">... </span>    <span class="k">for</span> <span class="n">term</span> <span class="ow">in</span> <span class="n">d</span><span class="p">[</span><span class="n">key</span><span class="p">]:</span>
<span class="gp">... </span>        <span class="k">if</span> <span class="n">term</span> <span class="ow">in</span> <span class="n">d</span><span class="p">:</span>
<span class="gp">... </span>            <span class="c1"># treat deepest contraction first</span>
<span class="gp">... </span>            <span class="k">pass</span>
<span class="gp">... </span>    <span class="c1"># treat outermost contactions here</span>
</pre></div>
</div>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="sympy.tensor.index_methods.get_indices">
<span class="sig-prename descclassname"><span class="pre">sympy.tensor.index_methods.</span></span><span class="sig-name descname"><span class="pre">get_indices</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">expr</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/tensor/index_methods.py#L202-L295"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.tensor.index_methods.get_indices" title="Permalink to this definition">¶</a></dt>
<dd><p>Determine the outer indices of expression <code class="docutils literal notranslate"><span class="pre">expr</span></code></p>
<p>By <em>outer</em> we mean indices that are not summation indices.  Returns a set
and a dict.  The set contains outer indices and the dict contains
information about index symmetries.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.tensor.index_methods</span> <span class="kn">import</span> <span class="n">get_indices</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.tensor</span> <span class="kn">import</span> <span class="n">IndexedBase</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">A</span> <span class="o">=</span> <span class="nb">map</span><span class="p">(</span><span class="n">IndexedBase</span><span class="p">,</span> <span class="p">[</span><span class="s1">&#39;x&#39;</span><span class="p">,</span> <span class="s1">&#39;y&#39;</span><span class="p">,</span> <span class="s1">&#39;A&#39;</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">i</span><span class="p">,</span> <span class="n">j</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">z</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;i j a z&#39;</span><span class="p">,</span> <span class="n">integer</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</pre></div>
</div>
<p>The indices of the total expression is determined, Repeated indices imply a
summation, for instance the trace of a matrix A:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">get_indices</span><span class="p">(</span><span class="n">A</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="n">i</span><span class="p">])</span>
<span class="go">(set(), {})</span>
</pre></div>
</div>
<p>In the case of many terms, the terms are required to have identical
outer indices.  Else an IndexConformanceException is raised.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">get_indices</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">+</span> <span class="n">A</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="n">j</span><span class="p">]</span><span class="o">*</span><span class="n">y</span><span class="p">[</span><span class="n">j</span><span class="p">])</span>
<span class="go">({i}, {})</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Exceptions</dt>
<dd class="field-odd"><p></p></dd>
</dl>
<p>An IndexConformanceException means that the terms ar not compatible, e.g.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">get_indices</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">+</span> <span class="n">y</span><span class="p">[</span><span class="n">j</span><span class="p">])</span>                
<span class="go">        (...)</span>
<span class="go">IndexConformanceException: Indices are not consistent: x(i) + y(j)</span>
</pre></div>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The concept of <em>outer</em> indices applies recursively, starting on the deepest
level.  This implies that dummies inside parenthesis are assumed to be
summed first, so that the following expression is handled gracefully:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">get_indices</span><span class="p">((</span><span class="n">x</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">+</span> <span class="n">A</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="n">j</span><span class="p">]</span><span class="o">*</span><span class="n">y</span><span class="p">[</span><span class="n">j</span><span class="p">])</span><span class="o">*</span><span class="n">x</span><span class="p">[</span><span class="n">j</span><span class="p">])</span>
<span class="go">({i, j}, {})</span>
</pre></div>
</div>
<p>This is correct and may appear convenient, but you need to be careful
with this as SymPy will happily .expand() the product, if requested.  The
resulting expression would mix the outer <code class="docutils literal notranslate"><span class="pre">j</span></code> with the dummies inside
the parenthesis, which makes it a different expression.  To be on the
safe side, it is best to avoid such ambiguities by using unique indices
for all contractions that should be held separate.</p>
</div>
</dd></dl>

</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../index.html">
              <img class="logo" src="../../_static/sympylogo.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="indexed.html"
                        title="previous chapter">Indexed Objects</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="tensor.html"
                        title="next chapter">Tensor</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../_sources/modules/tensor/index_methods.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="https://docs.sympy.org/latest/search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="tensor.html" title="Tensor"
             >next</a> |</li>
        <li class="right" >
          <a href="indexed.html" title="Indexed Objects"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" >Tensor</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Methods</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2021 SymPy Development Team.
      Last updated on Sep 30, 2021.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.1.2.
    </div>
  </body>

<!-- Mirrored from docs.sympy.org/latest/modules/tensor/index_methods.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:28:08 GMT -->
</html>